﻿<UserControl x:Class="Tanis.Controls.FavoritesControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480"
    x:Name="FavoritesUserControl" >
    
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <ListBox HorizontalAlignment="Left" Name="_favouriteRoutes" VerticalAlignment="Top" Width="460" >            
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" Height="80" >
                    <Button Height="80" Tap="Button_Tap">
                        <Button.Content>
                            <TextBlock Width="300" FontSize="28" Text="{Binding Name}" Height="50" />
                        </Button.Content>
                    </Button>
                        <Button Height="80" BorderThickness="0,0,0,0" 
                                Tap="Button_Tap_1" Tag="{Binding Name}">
                            <Button.Content>
                                    <Image Source="{Binding ElementName=FavoritesUserControl, Path=TrashImagePath}" 
                                       Height="60" />
                            </Button.Content>
                        </Button>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
